//#pragma OPENCL EXTENSION cl_amd_printf:enable
#ifdef cl_amd_fp64 
#pragma OPENCL EXTENSION cl_amd_fp64 : enable
#endif
#ifdef cl_khr_fp64
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
#endif

__kernel void
sum(__global float* const dA,
    __global float* const dB,
    __global float* dResult)

{
    const size_t bx = get_group_id(0);
    const size_t tx = get_local_id(0);


	for (unsigned i = 0; i < 16; ++i) {
		//const unsigned pIndex = index * 16 + i;
		const unsigned pIndex = (256 * 16 * bx) + tx + (i * 256); 
		const float a =  dA[pIndex];
		const float b =  dB[pIndex];
		const float c = a * b;
		const float d = a + b;
		dResult[pIndex]  =  c;
	}
}

